/*
 * @Description:
 * @Author: Zzt
 * @Date: 2022-11-10 16:49:18
 * @LastEditTime: 2022-11-21 19:48:18
 */
import { createContext, useReducer, useEffect, useContext } from 'react';
import { SET_CHART_TYPE } from '../constants';
import { QualityInspectionReducer } from '../reducers/QualityInspectionReducer';
const initialState = {
  dataList: []
};
const QualityInspectionContext = createContext();
const QualityInspectionContextProvider = (props) => {
  const [state, dispatch] = useReducer(QualityInspectionReducer, initialState);
  const actions = {};
  useEffect(() => {}, []);
  return (
    <QualityInspectionContext.Provider value={{ ...state, ...actions }}>
      {props.children}
    </QualityInspectionContext.Provider>
  );
};
export const useQualityInspectionContext = () => {
  return useContext(QualityInspectionContext);
};
export { QualityInspectionContext, QualityInspectionContextProvider };
